﻿<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition template="/META-INF/templates/customerTemplate.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:mg="http://at.irian/mygourmet">
    <ui:param name="title" value="#{msgs.title_main} - #{msgs.title_edit_address}"/>
    <ui:define name="content">
        <h2><h:outputText value="#{msgs.title_edit_address}"/></h2>
        <h:messages showDetail="true" showSummary="false"/>
        <h:form id="form">
            <h:panelGrid id="grid" columns="2">
                <h:outputLabel for="zipCode" value="#{msgs.zip_code}:"/>
                <h:inputText id="zipCode" size="30"
                             value="#{addressBean.address.zipCode}">
                    <mg:convertZipCode/>
                </h:inputText>
                <h:outputLabel for="city" value="#{msgs.city}:"/>
                <h:inputText id="city" size="30" maxlength="40"
                             value="#{addressBean.address.city}"/>
                <h:outputLabel for="street" value="#{msgs.street}:"/>
                <h:inputText id="street" size="30" maxlength="40"
                             value="#{addressBean.address.street}"/>
                <h:outputLabel for="country" value="#{msgs.country}:"/>
                <h:inputText id="country" size="30" maxlength="40"
                             value="#{addressBean.address.country}"/>
            </h:panelGrid>
            <h:commandButton id="save" action="#{addressBean.save}" value="#{msgs.save}"/>
            <h:commandButton id="cancel" value="#{msgs.cancel}" immediate="true"
                             action="/showCustomer.xhtml"/>
        </h:form>
    </ui:define>
</ui:composition>
